package com.aaa.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@AllArgsConstructor
@Data
@NoArgsConstructor
public class Users {
int userid;
int deptid;
String username;
String password;
String phonenumber;
String sex;
String avater;
String salt;
String status;
String del_flag;
String create_by;
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    //从页面传值到controller的时候，自动解析字符串日期到date
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
Date create_time;
String update_by;
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    //从页面传值到controller的时候，自动解析字符串日期到date
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
Date update_time;
String remark;
    int role_id;
    private String delFlag;
    private String email;
    private String avatar;

    private String createBy;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @DateTimeFormat(pattern = "yy-MM-dd HH:mm:ss")
    private Date createTime;

    private String updateBy;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @DateTimeFormat(pattern = "yy-MM-dd HH:mm:ss")
    private Date updateTime;
    private Integer roleId;

    public void setUserid(int userid) {
        this.userid = userid;
    }

    public void setDeptid(int deptid) {
        this.deptid = deptid;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public void setPhonenumber(String phonenumber) {
        this.phonenumber = phonenumber;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public void setAvater(String avater) {
        this.avater = avater;
    }

    public void setSalt(String salt) {
        this.salt = salt;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public void setDel_flag(String del_flag) {
        this.del_flag = del_flag;
    }

    public void setCreate_by(String create_by) {
        this.create_by = create_by;
    }

    public void setCreate_time(Date create_time) {
        this.create_time = create_time;
    }

    public void setUpdate_by(String update_by) {
        this.update_by = update_by;
    }

    public void setUpdate_time(Date update_time) {
        this.update_time = update_time;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public void setRole_id(int role_id) {
        this.role_id = role_id;
    }

    public void setDelFlag(String delFlag) {
        this.delFlag = delFlag;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    public void setCreateBy(String createBy) {
        this.createBy = createBy;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public void setUpdateBy(String updateBy) {
        this.updateBy = updateBy;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public void setRoleId(Integer roleId) {
        this.roleId = roleId;
    }
    private Dept dept;

    private Role role;

}
